#import <Foundation/Foundation.h>
#import "GetOptions.h"

void test0(){
	NSArray* parameters = [NSArray arrayWithObjects:@"slow=i", @"testdir=s", @"age=i", @"verbose", nil];
	
	GetOptions* options = [[GetOptions alloc] init:parameters];
	
	NSLog(@"%@", options);		
}

void test1(){
	NSDictionary* defaults = [NSDictionary dictionaryWithObjectsAndKeys:
							  @"/tmp/apressel", @"testdir",
							  [NSNumber numberWithInt:99], @"age",
							  nil];
	
	NSArray* parameters = [NSArray arrayWithObjects:@"slow=i", @"testdir=s", @"age=i", @"verbose", nil];
	
	GetOptions* options = [[GetOptions alloc] init:parameters withDefaults:defaults];
	
	NSLog(@"%@", options);		
}


void test2(){
	NSDictionary* defaults = [NSDictionary dictionaryWithObjectsAndKeys:
							  @"/tmp", @"testdir",
							  [NSNumber numberWithInt:33], @"age",
							  nil];
	
	NSArray* parameters = [NSArray arrayWithObjects:@"testdir=s", @"age=i", @"verbose", nil];
	
	GetOptions* options = [[GetOptions alloc] init:parameters withDefaults:defaults];
	
	NSLog(@"%@", options);		
}

void test3(){
	NSDictionary* defaults = [NSDictionary dictionaryWithObjectsAndKeys:
							  @"/tmp", @"testdir",
							  [NSNumber numberWithInt:33], @"age",
							  nil];
	
	NSArray* parameters = [NSArray arrayWithObjects:@"slow=i", @"testdir=s", @"age=i", @"verbage=s", @"verbose", nil];
	
	GetOptions* options = [[GetOptions alloc] init:parameters withDefaults:defaults];
	
	NSLog(@"%@", options);		
}

void test4(){
	NSDictionary* defaults = [NSDictionary dictionaryWithObjectsAndKeys:
							  @"/tmp", @"testdir",
							  [NSNumber numberWithInt:33], @"age",
							  nil];
	
	NSArray* parameters = [NSArray arrayWithObjects:@"slow=i", @"testdir=i", @"age=i", @"verbose", nil];
	
	GetOptions* options = [[GetOptions alloc] init:parameters withDefaults:defaults];
	
	NSLog(@"%@", options);		
}

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

	NSLog(@"Starting TEST 0\n");
	test1();
	
	NSLog(@"Starting TEST 1\n");
	test1();
	
	NSLog(@"Starting TEST 2\n");
	test2();
	
	NSLog(@"Starting TEST 3\n");
	test3();

	NSLog(@"Starting TEST 4\n");
	test4();

	
	[pool drain];
    return 0;
}

